<?php
function dateToFormat($date, $format){
    return date($format, strtotime($date));
}

function afficherDateTime($date){
    return dateToFormat($date,"d/m/Y H:i:s");
}

function afficherAnneeScolaire($date){
    $Y=intval(dateToFormat($date,"Y"));
    $m=intval(dateToFormat($date,"m"));
    if($m>8){
       return $Y; 
    }else{
        return ($Y-1);
    }
}



/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
